package com.example.databindingdemo;

/**
 * @author: tuyrt7 on 2020/9/8.
 */
public class BookRatingUtils {
    public static String getRatingString(int rating) {
        switch (rating) {
            case 0:
                return "零星";
            case 1:
                return "一星";
            case 2:
                return "二星";
            case 3:
                return "三星";
            case 4:
                return "四星";
            case 5:
                return "五星";
            default:
                return "";
        }
    }
}
